<template>
  <div class="main">
    <dv-border-box9 class="border-box9">
      <div class="wrap-top" style="display: flex;justify-content: space-evenly;align-items: center;">
        <div class="left" style="display: grid;grid-template-columns: repeat(2, 150px);grid-template-rows: repeat(2, 1fr);">
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.erpSellOperIncome?.totalTkAmount }}</span>
              <span>汽车票日售票总数</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.erpSellOperIncome?.checkTkCount }}</span>
              <span>汽车票日检票总数</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.erpSellOperIncome?.totalTkPrice }}</span>
              <span>汽车票日售票金额</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.erpSellOperIncome?.returnTkPrice }}</span>
              <span>汽车票日退票金额</span>
            </div>
          </dv-border-box12>
        </div>
        <div class="center-chart">
          <chart :totalPrice="config?.totalSellOperIncome?.totalTkPrice" />
        </div>
        <div class="right" style="display: grid;grid-template-columns: repeat(2, 150px);grid-template-rows: repeat(2, 1fr);">
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.dzSellOperIncome?.totalTkAmount }}</span>
              <span>定制日售票总数</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.dzSellOperIncome?.checkTkCount }}</span>
              <span>定制日检票总数</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.dzSellOperIncome?.totalTkPrice }}</span>
              <span>定制日售票金额</span>
            </div>
          </dv-border-box12>
          <dv-border-box12 style="height: 70px;display: flex;justify-content: center;align-items: center;">
            <div class="member-num" style="height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 5px;">
              <span>{{ config?.dzSellOperIncome?.returnTkPrice }}</span>
              <span>定制日退票金额</span>
            </div>
          </dv-border-box12>
        </div>
      </div>
      <div class="wrap-center" style="display: flex;flex-direction: column;align-items: center;justify-content: center;font-size: 20px;font-weight: bold;">
        实时注册会员数
        <DigitalFlop :value="config?.vipCount" />
      </div>
      <div class="wrap-bottom" style="display: flex;justify-content: space-evenly;align-items: center;">
        <div class="member-num" style="display: flex;align-items: center;">
          <dv-decoration9 style="width: 50px;height: 50px">{{ config?.totalSellOperIncome?.totalTkAmount }}</dv-decoration9>
          <span>日售票总数</span>
        </div>
        <div class="member-num" style="display: flex;align-items: center;">
          <dv-decoration9 style="width: 50px;height: 50px">{{ config?.totalSellOperIncome?.checkTkCount }}</dv-decoration9>
          <span>日检票总数</span>
        </div>
        <div class="member-num" style="display: flex;align-items: center;">
          <dv-decoration9 style="width: 50px;height: 50px">{{ config?.totalSellOperIncome?.reportSchAmount }}</dv-decoration9>
          <span>日发班总数</span>
        </div>
        <div class="member-num" style="display: flex;align-items: center;">
          <dv-decoration9 style="width: 50px;height: 50px">{{ config?.totalSellOperIncome?.returnTkAmount }}</dv-decoration9>
          <span>日退票总数</span>
        </div>
        
      </div>
    </dv-border-box9>
  </div>
</template>

<script>
import { defineComponent, ref, onMounted } from 'vue'
import Chart from '../mainContent/chart/draw'
import DigitalFlop from '@/components/digitalFlop'
import { useHomeStore } from '@/store'

export default defineComponent({
  components: {
    Chart,
    DigitalFlop
  },
  setup() {
    const home = useHomeStore();
    const config = ref()

    onMounted(async () => {
      config.value = await home.greenSellOperIncome();
      console.log(`output->config.value`,config.value)
    })
    return {
      config,
    }
  }
})
</script>

<style lang="scss" scoped>
.main {
  padding: 6px 4px;
  padding-bottom: 0;
  width: 100%;
  display: flex;
  height: 510px;
  justify-content: space-between;
  .border-box9 {
    width: 100%;
    height: 100%;
  }
  .bg-color-black {
    border-radius: 5px;
  }
  .ranking {
    padding: 10px;
    width: 59%;
    .dv-scr-rank-board {
      height: 220px;
    }
  }
  .percent {
    width: 40%;
    display: flex;
    flex-wrap: wrap;
    .item {
      width: 50%;
      height: 120px;
      span {
        margin-top: 8px;
        font-size: 14px;
        display: flex;
        justify-content: center;
      }
    }
    .water {
      width: 100%;
      .dv-wa-le-po {
        height: 120px;
      }
    }
  }
}
</style>
